<?php

namespace App\Admin\Actions\UserAction;

use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;

class Refresh extends RowAction
{
    public $name = '刷新升级状态';

    public function handle(Model $user)
    {
	    user_upgrade($user);
	    return $this->response()->success('刷新成功')->refresh();
    }

    public function dialog()
    {
    	$this->confirm('确定刷新当前会员升级状态');
    }
}
